load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "filters",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {},
        "lib": {"name": "filters"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-filters",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    features = ["fb"],
    named_deps = {
        "blake3-constants": "//blake3:blake3-constants-rust-nothrift",
    },
    test_deps = [
        "fbsource//third-party/rust:tempfile",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:blake3",
        "fbsource//third-party/rust:derivative",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:tracing",
        "//eden/scm/lib/config/model:configmodel",
        "//eden/scm/lib/indexedlog:indexedlog",
        "//eden/scm/lib/mincode:mincode",
        "//eden/scm/lib/revisionstore:revisionstore",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/util:util",
    ],
)
